package com.atguigu.gmall.search.entity;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

/**
 * @author lhh
 * @ClassName Person
 * @date 2022 2022/12/12
 */

@Data
@NoArgsConstructor
@AllArgsConstructor
@Document(indexName = "person")
public class Person {

    @Id
    private String id;

    @Field(value = "name",type = FieldType.Text)
    private String name;

    @Field(value = "address",type = FieldType.Text)
    private String address;
    ///usr/share/elasticsearch/plugins
}
